package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * IpListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class IpListId implements java.io.Serializable {

	// Fields

	private Integer low;
	private Integer high;
	private String note;

	// Constructors

	/** default constructor */
	public IpListId() {
	}

	/** full constructor */
	public IpListId(Integer low, Integer high, String note) {
		this.low = low;
		this.high = high;
		this.note = note;
	}

	// Property accessors

	@Column(name = "low")
	public Integer getLow() {
		return this.low;
	}

	public void setLow(Integer low) {
		this.low = low;
	}

	@Column(name = "high")
	public Integer getHigh() {
		return this.high;
	}

	public void setHigh(Integer high) {
		this.high = high;
	}

	@Column(name = "note", length = 16777215)
	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof IpListId))
			return false;
		IpListId castOther = (IpListId) other;

		return ((this.getLow() == castOther.getLow()) || (this.getLow() != null
				&& castOther.getLow() != null && this.getLow().equals(
				castOther.getLow())))
				&& ((this.getHigh() == castOther.getHigh()) || (this.getHigh() != null
						&& castOther.getHigh() != null && this.getHigh()
						.equals(castOther.getHigh())))
				&& ((this.getNote() == castOther.getNote()) || (this.getNote() != null
						&& castOther.getNote() != null && this.getNote()
						.equals(castOther.getNote())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getLow() == null ? 0 : this.getLow().hashCode());
		result = 37 * result
				+ (getHigh() == null ? 0 : this.getHigh().hashCode());
		result = 37 * result
				+ (getNote() == null ? 0 : this.getNote().hashCode());
		return result;
	}

}